<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智教慧学云平台</title>
    <style>
        :root {
            --primary-color: #3498db;
            --secondary-color: #2ecc71;
            --dark-color: #2c3e50;
            --light-color: #ecf0f1;
            --danger-color: #e74c3c;
            --warning-color: #f39c12;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* 导航栏样式 */
        header {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            padding: 1rem 0;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 1.8rem;
            font-weight: bold;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            font-size: 2rem;
        }
        
        .nav-links {
            display: flex;
            list-style: none;
        }
        
        .nav-links li {
            margin-left: 2rem;
        }
        
        .nav-links a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem;
            border-radius: 4px;
        }
        
        .nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        
        .auth-buttons a {
            margin-left: 1rem;
            padding: 0.5rem 1.5rem;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .login-btn {
            color: white;
            border: 1px solid white;
        }
        
        .login-btn:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        
        .register-btn {
            background-color: white;
            color: var(--primary-color);
        }
        
        .register-btn:hover {
            background-color: rgba(255, 255, 255, 0.9);
        }
        
        /* 用户头像和下拉菜单 */
        .user-menu {
            position: relative;
            display: flex;
            align-items: center;
            cursor: pointer;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: white;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-left: 1rem;
            overflow: hidden;
        }
        
        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 200px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1000;
        }
        
        .user-menu:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(10px);
        }
        
        .dropdown-menu ul {
            list-style: none;
        }
        
        .dropdown-menu a {
            display: block;
            padding: 0.8rem 1rem;
            color: var(--dark-color);
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .dropdown-menu a:hover {
            background-color: var(--light-color);
            color: var(--primary-color);
        }
        
        .dropdown-menu a i {
            margin-right: 0.5rem;
            width: 20px;
            text-align: center;
        }
        
        /* 英雄区域样式 */
        .hero {
            background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
            background-size: cover;
            background-position: center;
            height: 500px;
            display: flex;
            align-items: center;
            text-align: center;
            color: white;
        }
        
        .hero-content {
            max-width: 800px;
            margin: 0 auto;
        }
        
        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
        }
        
        .hero p {
            font-size: 1.2rem;
            margin-bottom: 2rem;
        }
        
        .cta-button {
            display: inline-block;
            background-color: var(--secondary-color);
            color: white;
            padding: 0.8rem 2rem;
            border-radius: 4px;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s ease;
        }
        
        .cta-button:hover {
            background-color: #27ae60;
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        
        /* 特色区域样式 */
        .features {
            padding: 5rem 0;
        }
        
        .section-title {
            text-align: center;
            margin-bottom: 3rem;
        }
        
        .section-title h2 {
            font-size: 2.5rem;
            color: var(--dark-color);
            margin-bottom: 1rem;
        }
        
        .section-title p {
            color: #777;
            max-width: 700px;
            margin: 0 auto;
        }
        
        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }
        
        .feature-card {
            background-color: white;
            border-radius: 8px;
            padding: 2rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            text-align: center;
        }
        
        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        }
        
        .feature-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
        }
        
        .feature-card h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--dark-color);
        }
        
        /* 课程区域样式 */
        .courses {
            padding: 5rem 0;
            background-color: #f8f9fa;
        }
        
        .courses-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }
        
        .course-card {
            background-color: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        
        .course-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        }
        
        .course-img {
            height: 200px;
            overflow: hidden;
        }
        
        .course-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: all 0.5s ease;
        }
        
        .course-card:hover .course-img img {
            transform: scale(1.1);
        }
        
        .course-content {
            padding: 1.5rem;
        }
        
        .course-category {
            display: inline-block;
            background-color: var(--light-color);
            color: var(--dark-color);
            padding: 0.3rem 0.8rem;
            border-radius: 4px;
            font-size: 0.8rem;
            margin-bottom: 0.5rem;
        }
        
        .course-card h3 {
            font-size: 1.3rem;
            margin-bottom: 0.5rem;
            color: var(--dark-color);
        }
        
        .course-meta {
            display: flex;
            justify-content: space-between;
            color: #777;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }
        
        .course-price {
            font-weight: bold;
            color: var(--secondary-color);
            font-size: 1.2rem;
        }
        
        /* 个人中心样式 */
        .profile-section {
            padding: 5rem 0;
        }
        
        .profile-container {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 2rem;
        }
        
        .profile-sidebar {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            padding: 2rem;
        }
        
        .profile-avatar {
            text-align: center;
            margin-bottom: 1.5rem;
            position: relative;
            cursor: pointer;
        }
        
        .profile-avatar img {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid var(--light-color);
        }
        
        .avatar-upload-overlay {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            display: none;
        }
        
        .profile-avatar:hover .avatar-upload-overlay {
            display: block;
        }
        
        .profile-name {
            text-align: center;
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            color: var(--dark-color);
        }
        
        .profile-email {
            text-align: center;
            color: #777;
            margin-bottom: 1.5rem;
        }
        
        .profile-menu {
            list-style: none;
        }
        
        .profile-menu li {
            margin-bottom: 0.5rem;
        }
        
        .profile-menu a {
            display: block;
            padding: 0.8rem 1rem;
            color: var(--dark-color);
            text-decoration: none;
            border-radius: 4px;
            transition: all 0.3s ease;
        }
        
        .profile-menu a:hover, .profile-menu a.active {
            background-color: var(--light-color);
            color: var(--primary-color);
        }
        
        .profile-menu a i {
            margin-right: 0.5rem;
            width: 20px;
            text-align: center;
        }
        
        .profile-content {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            padding: 2rem;
        }
        
        .profile-content-title {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
            color: var(--dark-color);
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
        }
        
        .profile-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }
        
        .info-group {
            margin-bottom: 1.5rem;
        }
        
        .info-label {
            font-weight: 500;
            color: var(--dark-color);
            margin-bottom: 0.5rem;
        }
        
        .info-value {
            color: #555;
        }
        
        .edit-input {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }
        
        .edit-btn, .save-btn, .cancel-btn {
            display: inline-block;
            padding: 0.5rem 1.5rem;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            margin-right: 10px;
        }
        
        .edit-btn {
            background-color: var(--primary-color);
            color: white;
        }
        
        .edit-btn:hover {
            background-color: #2980b9;
        }
        
        .save-btn {
            background-color: var(--secondary-color);
            color: white;
        }
        
        .cancel-btn {
            background-color: #95a5a6;
            color: white;
        }
        
        .my-courses {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1.5rem;
        }
        
        .progress-bar {
            height: 8px;
            background-color: var(--light-color);
            border-radius: 4px;
            margin-top: 0.5rem;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background-color: var(--secondary-color);
            border-radius: 4px;
        }
        
        .course-progress {
            font-size: 0.9rem;
            color: #777;
            margin-top: 0.5rem;
        }
        
        /* 登录/注册模态框样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background-color: white;
            border-radius: 8px;
            width: 400px;
            max-width: 90%;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            animation: modalFadeIn 0.3s ease;
        }
        
        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: translateY(-50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .modal-header {
            padding: 1.5rem;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-header h3 {
            font-size: 1.5rem;
            color: var(--dark-color);
        }
        
        .close-btn {
            font-size: 1.5rem;
            cursor: pointer;
            color: #777;
            transition: all 0.3s ease;
        }
        
        .close-btn:hover {
            color: var(--danger-color);
        }
        
        .modal-body {
            padding: 1.5rem;
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--dark-color);
        }
        
        .form-control {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
            outline: none;
        }
        
        .btn {
            display: inline-block;
            padding: 0.8rem 1.5rem;
            border-radius: 4px;
            font-weight: 500;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: #2980b9;
        }
        
        .btn-block {
            display: block;
            width: 100%;
        }
        
        .text-center {
            text-align: center;
        }
        
        .mt-3 {
            margin-top: 1rem;
        }
        
        .forgot-password {
            display: block;
            text-align: right;
            margin-top: 0.5rem;
            color: var(--primary-color);
            text-decoration: none;
            font-size: 0.9rem;
        }
        
        .forgot-password:hover {
            text-decoration: underline;
        }
        
        .social-login {
            margin-top: 1.5rem;
        }
        
        .social-login p {
            text-align: center;
            color: #777;
            position: relative;
            margin-bottom: 1rem;
        }
        
        .social-login p::before,
        .social-login p::after {
            content: "";
            display: inline-block;
            width: 30%;
            height: 1px;
            background-color: #ddd;
            position: absolute;
            top: 50%;
        }
        
        .social-login p::before {
            left: 0;
        }
        
        .social-login p::after {
            right: 0;
        }
        
        .social-icons {
            display: flex;
            justify-content: center;
            gap: 1rem;
        }
        
        .social-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .social-icon:hover {
            transform: translateY(-3px);
        }
        
        .facebook {
            background-color: #3b5998;
        }
        
        .google {
            background-color: #db4437;
        }
        
        .twitter {
            background-color: #1da1f2;
        }
        
        /* 头像上传模态框 */
        .avatar-modal {
            display: none;
        }
        
        .avatar-preview {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            margin: 0 auto 1rem;
            overflow: hidden;
            border: 3px solid var(--light-color);
        }
        
        .avatar-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .avatar-upload-options {
            text-align: center;
        }
        
        .upload-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: white;
            padding: 0.5rem 1.5rem;
            border-radius: 4px;
            cursor: pointer;
            margin-bottom: 1rem;
        }
        
        /* 页脚样式 */
        footer {
            background-color: var(--dark-color);
            color: white;
            padding: 3rem 0;
        }
        
        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }
        
        .footer-column h4 {
            font-size: 1.3rem;
            margin-bottom: 1.5rem;
            position: relative;
            padding-bottom: 0.5rem;
        }
        
        .footer-column h4::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 50px;
            height: 2px;
            background-color: var(--primary-color);
        }
        
        .footer-column p {
            margin-bottom: 1rem;
            color: #bbb;
        }
        
        .footer-links {
            list-style: none;
        }
        
        .footer-links li {
            margin-bottom: 0.8rem;
        }
        
        .footer-links a {
            color: #bbb;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .footer-links a:hover {
            color: white;
            padding-left: 5px;
        }
        
        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .social-links a {
            color: white;
            background-color: rgba(255, 255, 255, 0.1);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .social-links a:hover {
            background-color: var(--primary-color);
        }
        
        .copyright {
            text-align: center;
            padding-top: 2rem;
            margin-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #bbb;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2.5rem;
            }
            
            .hero p {
                font-size: 1rem;
            }
            
            nav {
                flex-direction: column;
            }
            
            .nav-links {
                margin-top: 1rem;
            }
            
            .nav-links li {
                margin-left: 1rem;
                margin-right: 1rem;
            }
            
            .auth-buttons {
                margin-top: 1rem;
            }
            
            .profile-container {
                grid-template-columns: 1fr;
            }
            
            .profile-info {
                grid-template-columns: 1fr;
            }
        }

        /* 通用区域显示控制 */
        .section {
            display: none;
        }
        
        .section.active {
            display: block;
        }
    </style>
    <!-- 使用Font Awesome图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
    <!-- 导航栏 -->
    <header>
        <div class="container">
            <nav>
                <div class="logo">
                    <i class="fas fa-graduation-cap"></i>
                    <span>智教慧学云平台</span>
                </div>
                <ul class="nav-links">
                    <li><a href="#home" class="nav-link">首页</a></li>
                    <li><a href="#courses" class="nav-link">课程</a></li>
                    <li><a href="#features" class="nav-link">特色</a></li>
                    <li><a href="#about" class="nav-link">关于我们</a></li>
                    <li><a href="#contact" class="nav-link">联系我们</a></li>
                </ul>
                <div class="auth-buttons" id="auth-buttons">
                    <a href="#" class="login-btn" id="open-login">登录</a>
                    <a href="#" class="register-btn" id="open-register">注册</a>
                </div>
                <!-- 登录后显示的用户菜单 -->
                <div class="user-menu" id="user-menu" style="display: none;">
                    <div class="user-avatar" id="user-avatar">
                        <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="用户头像">
                    </div>
                    <div class="dropdown-menu">
                        <ul>
                            <li><a href="#profile" class="nav-link"><i class="fas fa-user"></i>个人中心</a></li>
                            <li><a href="#my-courses" class="nav-link"><i class="fas fa-book"></i>我的课程</a></li>
                            <li><a href="#settings" class="nav-link"><i class="fas fa-cog"></i>设置</a></li>
                            <li><a href="#" id="logout-btn"><i class="fas fa-sign-out-alt"></i>退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
    </header>

    <!-- 个人中心区域 -->
    <section class="profile-section section" id="profile">
        <div class="container">
            <div class="profile-container">
                <div class="profile-sidebar">
                    <div class="profile-avatar" id="profile-avatar">
                        <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="用户头像" id="sidebar-avatar-img">
                        <div class="avatar-upload-overlay" id="open-avatar-upload">
                            <i class="fas fa-camera"></i> 更换头像
                        </div>
                    </div>
                    <h3 class="profile-name" id="sidebar-profile-name">张三</h3>
                    <p class="profile-email">zhangsan@example.com</p>
                    <ul class="profile-menu">
                        <li><a href="#profile-info" class="profile-nav-link active" data-target="profile-info-content"><i class="fas fa-user"></i>个人信息</a></li>
                        <li><a href="#profile-courses" class="profile-nav-link" data-target="profile-courses-content"><i class="fas fa-book"></i>我的课程</a></li>
                        <li><a href="#profile-progress" class="profile-nav-link" data-target="profile-progress-content"><i class="fas fa-chart-line"></i>学习进度</a></li>
                        <li><a href="#profile-settings" class="profile-nav-link" data-target="profile-settings-content"><i class="fas fa-cog"></i>账户设置</a></li>
                        <li><a href="#profile-messages" class="profile-nav-link" data-target="profile-messages-content"><i class="fas fa-envelope"></i>消息中心</a></li>
                    </ul>
                </div>
                <div class="profile-content">
                    <!-- 个人信息 -->
                    <div id="profile-info-content" class="profile-content-item active">
                        <h2 class="profile-content-title">个人信息</h2>
                        <div class="profile-info">
                            <div class="info-group">
                                <div class="info-label">用户名</div>
                                <div class="info-value" id="username-display">张三</div>
                                <input type="text" class="edit-input" id="username-input" value="张三" style="display: none;">
                            </div>
                            <div class="info-group">
                                <div class="info-label">电子邮箱</div>
                                <div class="info-value">zhangsan@example.com</div>
                            </div>
                            <div class="info-group">
                                <div class="info-label">手机号码</div>
                                <div class="info-value">138****5678</div>
                            </div>
                            <div class="info-group">
                                <div class="info-label">注册时间</div>
                                <div class="info-value">2023年5月15日</div>
                            </div>
                            <div class="info-group">
                                <div class="info-label">学习等级</div>
                                <div class="info-value">黄金会员</div>
                            </div>
                            <div class="info-group">
                                <div class="info-label">学习积分</div>
                                <div class="info-value">1250</div>
                            </div>
                        </div>
                        <button class="edit-btn" id="edit-info-btn">编辑信息</button>
                        <button class="save-btn" id="save-info-btn" style="display: none;">保存</button>
                        <button class="cancel-btn" id="cancel-edit-btn" style="display: none;">取消</button>
                    </div>
                    
                    <!-- 我的课程 -->
                    <div id="profile-courses-content" class="profile-content-item" style="display: none;">
                        <h2 class="profile-content-title">我的课程</h2>
                        <div class="my-courses">
                            <div class="course-card">
                                <div class="course-img">
                                    <img src="https://images.unsplash.com/photo-1546410531-bb4caa6b424d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="编程课程">
                                </div>
                                <div class="course-content">
                                    <h3>Python全栈开发</h3>
                                    <div class="course-meta">
                                        <span><i class="far fa-clock"></i> 60课时</span>
                                    </div>
                                    <div class="progress-bar">
                                        <div class="progress-fill" style="width: 75%;"></div>
                                    </div>
                                    <div class="course-progress">已完成75%</div>
                                    <a href="#" class="btn btn-primary" style="display: block; text-align: center; margin-top: 1rem;">继续学习</a>
                                </div>
                            </div>
                            <div class="course-card">
                                <div class="course-img">
                                    <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="数据科学课程">
                                </div>
                                <div class="course-content">
                                    <h3>数据分析与可视化</h3>
                                    <div class="course-meta">
                                        <span><i class="far fa-clock"></i> 45课时</span>
                                    </div>
                                    <div class="progress-bar">
                                        <div class="progress-fill" style="width: 30%;"></div>
                                    </div>
                                    <div class="course-progress">已完成30%</div>
                                    <a href="#" class="btn btn-primary" style="display: block; text-align: center; margin-top: 1rem;">继续学习</a>
                                </div>
                            </div>
                            <div class="course-card">
                                <div class="course-img">
                                    <img src="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="语言学习课程">
                                </div>
                                <div class="course-content">
                                    <h3>商务英语高级课程</h3>
                                    <div class="course-meta">
                                        <span><i class="far fa-clock"></i> 50课时</span>
                                    </div>
                                    <div class="progress-bar">
                                        <div class="progress-fill" style="width: 10%;"></div>
                                    </div>
                                    <div class="course-progress">已完成10%</div>
                                    <a href="#" class="btn btn-primary" style="display: block; text-align: center; margin-top: 1rem;">继续学习</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 学习进度 -->
                    <div id="profile-progress-content" class="profile-content-item" style="display: none;">
                        <h2 class="profile-content-title">学习进度</h2>
                        <div class="info-group">
                            <div class="info-label">总学习时长</div>
                            <div class="info-value">36小时45分钟</div>
                        </div>
                        <div class="info-group">
                            <div class="info-label">本周学习时长</div>
                            <div class="info-value">5小时12分钟</div>
                        </div>
                        <div class="info-group">
                            <div class="info-label">已完成课程</div>
                            <div class="info-value">3门</div>
                        </div>
                        <div class="info-group">
                            <div class="info-label">进行中课程</div>
                            <div class="info-value">5门</div>
                        </div>
                        <div class="info-group">
                            <div class="info-label">学习效率</div>
                            <div class="info-value">85%</div>
                        </div>
                    </div>

                    <!-- 账户设置 -->
                    <div id="profile-settings-content" class="profile-content-item" style="display: none;">
                        <h2 class="profile-content-title">账户设置</h2>
                        <div class="profile-info">
                            <div class="info-group">
                                <div class="info-label">修改密码</div>
                                <button class="edit-btn">更改密码</button>
                            </div>
                            <div class="info-group">
                                <div class="info-label">通知设置</div>
                                <button class="edit-btn">设置通知</button>
                            </div>
                            <div class="info-group">
                                <div class="info-label">隐私设置</div>
                                <button class="edit-btn">隐私管理</button>
                            </div>
                            <div class="info-group">
                                <div class="info-label">账号安全</div>
                                <button class="edit-btn">安全中心</button>
                            </div>
                        </div>
                    </div>

                    <!-- 消息中心 -->
                    <div id="profile-messages-content" class="profile-content-item" style="display: none;">
                        <h2 class="profile-content-title">消息中心</h2>
                        <div class="info-group">
                            <div class="info-value">暂无新消息</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 英雄区域 -->
    <section class="hero section active" id="home">
        <div class="container">
            <div class="hero-content">
                <h1>开启您的智慧学习之旅</h1>
                <p>智教慧学云平台为您提供最优质的教育资源，个性化的学习体验，帮助您实现学习目标，提升知识技能。</p>
                <a href="#courses" class="cta-button nav-link">探索课程</a>
            </div>
        </div>
    </section>

    <!-- 特色区域 -->
    <section class="features section" id="features">
        <div class="container">
            <div class="section-title">
                <h2>我们的特色</h2>
                <p>智教慧学云平台致力于为学生、教师和教育机构提供全方位的教育解决方案</p>
            </div>
            <div class="features-grid">
                <div class="feature-card">
                    <div class="feature-icon">
                        <i class="fas fa-laptop-code"></i>
                    </div>
                    <h3>在线学习</h3>
                    <p>随时随地通过电脑或移动设备访问我们的课程，灵活安排学习时间。</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">
                        <i class="fas fa-chalkboard-teacher"></i>
                    </div>
                    <h3>专业教师</h3>
                    <p>由经验丰富的专业教师授课，确保教学质量，解答学习疑问。</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">
                        <i class="fas fa-book-open"></i>
                    </div>
                    <h3>丰富资源</h3>
                    <p>涵盖多个学科领域的课程资源，满足不同学习需求。</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">
                        <i class="fas fa-chart-line"></i>
                    </div>
                    <h3>学习分析</h3>
                    <p>智能分析学习进度和效果，提供个性化学习建议。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- 课程区域 -->
    <section class="courses section" id="courses">
        <div class="container">
            <div class="section-title">
                <h2>热门课程</h2>
                <p>精选优质课程，助您提升技能，拓展知识</p>
            </div>
            <div class="courses-grid">
                <div class="course-card">
                    <div class="course-img">
                        <img src="https://images.unsplash.com/photo-1546410531-bb4caa6b424d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="编程课程">
                    </div>
                    <div class="course-content">
                        <span class="course-category">编程开发</span>
                        <h3>Python全栈开发</h3>
                        <div class="course-meta">
                            <span><i class="far fa-user"></i> 张老师</span>
                            <span><i class="far fa-clock"></i> 60课时</span>
                        </div>
                        <p>从基础到进阶，掌握Python全栈开发技能，包括Django框架、前端开发等。</p>
                        <div class="course-price">¥399</div>
                    </div>
                </div>
                <div class="course-card">
                    <div class="course-img">
                        <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="数据科学课程">
                    </div>
                    <div class="course-content">
                        <span class="course-category">数据科学</span>
                        <h3>数据分析与可视化</h3>
                        <div class="course-meta">
                            <span><i class="far fa-user"></i> 李教授</span>
                            <span><i class="far fa-clock"></i> 45课时</span>
                        </div>
                        <p>学习使用Python进行数据分析，掌握Pandas、NumPy和Matplotlib等工具。</p>
                        <div class="course-price">¥299</div>
                    </div>
                </div>
                <div class="course-card">
                    <div class="course-img">
                        <img src="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="语言学习课程">
                    </div>
                    <div class="course-content">
                        <span class="course-category">语言学习</span>
                        <h3>商务英语高级课程</h3>
                        <div class="course-meta">
                            <span><i class="far fa-user"></i> Sarah老师</span>
                            <span><i class="far fa-clock"></i> 50课时</span>
                        </div>
                        <p>提升商务场景下的英语沟通能力，包括会议、谈判、邮件写作等实用技能。</p>
                        <div class="course-price">¥259</div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 关于我们 -->
    <section class="section" id="about" style="padding: 5rem 0;">
        <div class="container">
            <div class="section-title">
                <h2>关于我们</h2>
                <p>智教慧学云平台致力于提供高质量的在线教育服务</p>
            </div>
            <div style="background-color: white; padding: 2rem; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);">
                <p>智教慧学云平台成立于2020年，是一家专注于在线教育的科技公司。我们汇聚了各领域的专业教师，打造了丰富多样的课程体系，旨在为学习者提供便捷、高效、优质的学习体验。</p>
                <br>
                <p>我们的使命是让每个人都能享受到高质量的教育资源，无论地域和时间限制，都能随时随地学习知识、提升技能。</p>
            </div>
        </div>
    </section>

    <!-- 联系我们 -->
    <section class="section" id="contact" style="padding: 5rem 0; background-color: #f8f9fa;">
        <div class="container">
            <div class="section-title">
                <h2>联系我们</h2>
                <p>如有任何问题或建议，请随时与我们联系</p>
            </div>
            <div style="background-color: white; padding: 2rem; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);">
                <div class="profile-info">
                    <div class="info-group">
                        <div class="info-label">邮箱</div>
                        <div class="info-value">contact@zhijiao.com</div>
                    </div>
                    <div class="info-group">
                        <div class="info-label">电话</div>
                        <div class="info-value">400-123-4567</div>
                    </div>
                    <div class="info-group">
                        <div class="info-label">地址</div>
                        <div class="info-value">北京市海淀区中关村科技园</div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 登录模态框 -->
    <div class="modal" id="login-modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>用户登录</h3>
                <span class="close-btn" id="close-login">&times;</span>
            </div>
            <div class="modal-body">
                <form id="login-form">
                    <div class="form-group">
                        <label for="login-email">电子邮箱</label>
                        <input type="email" id="login-email" class="form-control" placeholder="请输入邮箱" required>
                    </div>
                    <div class="form-group">
                        <label for="login-password">密码</label>
                        <input type="password" id="login-password" class="form-control" placeholder="请输入密码" required>
                    </div>
                    <a href="#" class="forgot-password">忘记密码？</a>
                    <button type="submit" class="btn btn-primary btn-block">登录</button>
                    <div class="social-login">
                        <p>其他登录方式</p>
                        <div class="social-icons">
                            <a href="#" class="social-icon facebook"><i class="fab fa-facebook-f"></i></a>
                            <a href="#" class="social-icon google"><i class="fab fa-google"></i></a>
                            <a href="#" class="social-icon twitter"><i class="fab fa-twitter"></i></a>
                        </div>
                    </div>
                    <div class="text-center mt-3">
                        还没有账号？<a href="#" id="switch-to-register" style="color: var(--primary-color);">立即注册</a>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 注册模态框 -->
    <div class="modal" id="register-modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>用户注册</h3>
                <span class="close-btn" id="close-register">&times;</span>
            </div>
            <div class="modal-body">
                <form id="register-form">
                    <div class="form-group">
                        <label for="register-name">用户名</label>
                        <input type="text" id="register-name" class="form-control" placeholder="请输入用户名" required>
                    </div>
                    <div class="form-group">
                        <label for="register-email">电子邮箱</label>
                        <input type="email" id="register-email" class="form-control" placeholder="请输入邮箱" required>
                    </div>
                    <div class="form-group">
                        <label for="register-password">密码</label>
                        <input type="password" id="register-password" class="form-control" placeholder="请输入密码" required>
                    </div>
                    <div class="form-group">
                        <label for="register-confirm">确认密码</label>
                        <input type="password" id="register-confirm" class="form-control" placeholder="请确认密码" required>
                    </div>
                    <button type="submit" class="btn btn-primary btn-block">注册</button>
                    <div class="text-center mt-3">
                        已有账号？<a href="#" id="switch-to-login" style="color: var(--primary-color);">立即登录</a>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 头像上传模态框 -->
    <div class="modal avatar-modal" id="avatar-modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>更换头像</h3>
                <span class="close-btn" id="close-avatar">&times;</span>
            </div>
            <div class="modal-body">
                <div class="avatar-preview">
                    <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="预览头像" id="avatar-preview-img">
                </div>
                <div class="avatar-upload-options">
                    <label class="upload-btn">
                        <i class="fas fa-upload"></i> 选择图片
                        <input type="file" id="avatar-upload-input" accept="image/*" style="display: none;">
                    </label>
                    <div>
                        <button class="btn btn-primary" id="save-avatar-btn">保存头像</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-column">
                    <h4>智教慧学云平台</h4>
                    <p>提供高质量的在线教育服务，助力每个人实现自我提升和成长。</p>
                    <div class="social-links">
                        <a href="#"><i class="fab fa-facebook-f"></i></a>
                        <a href="#"><i class="fab fa-twitter"></i></a>
                        <a href="#"><i class="fab fa-instagram"></i></a>
                        <a href="#"><i class="fab fa-linkedin-in"></i></a>
                    </div>
                </div>
                <div class="footer-column">
                    <h4>快速链接</h4>
                    <ul class="footer-links">
                        <li><a href="#home" class="nav-link">首页</a></li>
                        <li><a href="#courses" class="nav-link">课程</a></li>
                        <li><a href="#features" class="nav-link">特色</a></li>
                        <li><a href="#about" class="nav-link">关于我们</a></li>
                        <li><a href="#contact" class="nav-link">联系我们</a></li>
                    </ul>
                </div>
                <div class="footer-column">
                    <h4>课程分类</h4>
                    <ul class="footer-links">
                        <li><a href="#">编程开发</a></li>
                        <li><a href="#">数据科学</a></li>
                        <li><a href="#">语言学习</a></li>
                        <li><a href="#">职业技能</a></li>
                        <li><a href="#">兴趣爱好</a></li>
                    </ul>
                </div>
            </div>
            <div class="copyright">
                <p>&copy; 2023 智教慧学云平台 版权所有</p>
            </div>
        </div>
    </footer>

    <script>
        // 页面元素
        const sections = document.querySelectorAll('.section');
        const navLinks = document.querySelectorAll('.nav-link');
        const profileNavLinks = document.querySelectorAll('.profile-nav-link');
        const profileContentItems = document.querySelectorAll('.profile-content-item');
        const authButtons = document.getElementById('auth-buttons');
        const userMenu = document.getElementById('user-menu');
        const logoutBtn = document.getElementById('logout-btn');
        const loginModal = document.getElementById('login-modal');
        const registerModal = document.getElementById('register-modal');
        const openLoginBtn = document.getElementById('open-login');
        const openRegisterBtn = document.getElementById('open-register');
        const closeLoginBtn = document.getElementById('close-login');
        const closeRegisterBtn = document.getElementById('close-register');
        const switchToRegisterBtn = document.getElementById('switch-to-register');
        const switchToLoginBtn = document.getElementById('switch-to-login');
        const loginForm = document.getElementById('login-form');
        const registerForm = document.getElementById('register-form');
        const editInfoBtn = document.getElementById('edit-info-btn');
        const saveInfoBtn = document.getElementById('save-info-btn');
        const cancelEditBtn = document.getElementById('cancel-edit-btn');
        const usernameDisplay = document.getElementById('username-display');
        const usernameInput = document.getElementById('username-input');
        const sidebarProfileName = document.getElementById('sidebar-profile-name');
        const openAvatarUpload = document.getElementById('open-avatar-upload');
        const avatarModal = document.getElementById('avatar-modal');
        const closeAvatarBtn = document.getElementById('close-avatar');
        const avatarUploadInput = document.getElementById('avatar-upload-input');
        const avatarPreviewImg = document.getElementById('avatar-preview-img');
        const saveAvatarBtn = document.getElementById('save-avatar-btn');
        const sidebarAvatarImg = document.getElementById('sidebar-avatar-img');
        const userAvatarImg = document.querySelector('#user-avatar img');

        // 导航功能 - 页面区域切换
        navLinks.forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                const targetId = this.getAttribute('href').substring(1);
                
                // 隐藏所有区域
                sections.forEach(section => {
                    section.classList.remove('active');
                });
                
                // 显示目标区域
                document.getElementById(targetId).classList.add('active');
                
                // 滚动到顶部
                window.scrollTo(0, 0);
            });
        });

        // 个人中心导航切换
        profileNavLinks.forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                
                // 移除所有激活状态
                profileNavLinks.forEach(l => l.classList.remove('active'));
                profileContentItems.forEach(item => item.style.display = 'none');
                
                // 添加当前激活状态
                this.classList.add('active');
                const targetId = this.getAttribute('data-target');
                document.getElementById(targetId).style.display = 'block';
            });
        });

        // 编辑个人信息功能
        editInfoBtn.addEventListener('click', function() {
            // 显示输入框，隐藏文本
            usernameDisplay.style.display = 'none';
            usernameInput.style.display = 'block';
            
            // 显示保存和取消按钮，隐藏编辑按钮
            editInfoBtn.style.display = 'none';
            saveInfoBtn.style.display = 'inline-block';
            cancelEditBtn.style.display = 'inline-block';
            
            // 聚焦到输入框
            usernameInput.focus();
        });

        // 取消编辑
        cancelEditBtn.addEventListener('click', function() {
            // 恢复显示状态
            usernameDisplay.style.display = 'block';
            usernameInput.style.display = 'none';
            
            // 恢复按钮状态
            editInfoBtn.style.display = 'inline-block';
            saveInfoBtn.style.display = 'none';
            cancelEditBtn.style.display = 'none';
            
            // 恢复原始值
            usernameInput.value = usernameDisplay.textContent;
        });

        // 保存编辑
        saveInfoBtn.addEventListener('click', function() {
            const newName = usernameInput.value.trim();
            if (newName && newName !== usernameDisplay.textContent) {
                // 更新显示的用户名
                usernameDisplay.textContent = newName;
                sidebarProfileName.textContent = newName;
                
                // 更新用户头像旁的文字（取首字母）
                if (userAvatarImg) {
                    // 如果有头像图片则不显示文字
                } else {
                    document.getElementById('user-avatar').textContent = newName.charAt(0);
                }
                
                alert('用户名更新成功！');
            }
            
            // 恢复显示状态
            usernameDisplay.style.display = 'block';
            usernameInput.style.display = 'none';
            
            // 恢复按钮状态
            editInfoBtn.style.display = 'inline-block';
            saveInfoBtn.style.display = 'none';
            cancelEditBtn.style.display = 'none';
        });

        // 头像上传功能
        openAvatarUpload.addEventListener('click', function() {
            avatarModal.style.display = 'flex';
        });

        closeAvatarBtn.addEventListener('click', function() {
            avatarModal.style.display = 'none';
        });

        // 选择图片预览
        avatarUploadInput.addEventListener('change', function(e) {
            const file = e.target.files[0];
            if (file) {
                const reader = new FileReader();
                reader.onload = function(event) {
                    avatarPreviewImg.src = event.target.result;
                };
                reader.readAsDataURL(file);
            }
        });

        // 保存头像
        saveAvatarBtn.addEventListener('click', function() {
            // 更新所有地方的头像
            sidebarAvatarImg.src = avatarPreviewImg.src;
            userAvatarImg.src = avatarPreviewImg.src;
            
            avatarModal.style.display = 'none';
            alert('头像更新成功！');
        });

        // 模态框控制
        openLoginBtn.addEventListener('click', function(e) {
            e.preventDefault();
            loginModal.style.display = 'flex';
        });

        openRegisterBtn.addEventListener('click', function(e) {
            e.preventDefault();
            registerModal.style.display = 'flex';
        });

        closeLoginBtn.addEventListener('click', function() {
            loginModal.style.display = 'none';
        });

        closeRegisterBtn.addEventListener('click', function() {
            registerModal.style.display = 'none';
        });

        switchToRegisterBtn.addEventListener('click', function(e) {
            e.preventDefault();
            loginModal.style.display = 'none';
            registerModal.style.display = 'flex';
        });

        switchToLoginBtn.addEventListener('click', function(e) {
            e.preventDefault();
            registerModal.style.display = 'none';
            loginModal.style.display = 'flex';
        });

        // 点击模态框外部关闭
        window.addEventListener('click', function(e) {
            if (e.target === loginModal) {
                loginModal.style.display = 'none';
            }
            if (e.target === registerModal) {
                registerModal.style.display = 'none';
            }
            if (e.target === avatarModal) {
                avatarModal.style.display = 'none';
            }
        });

        // 登录功能
        loginForm.addEventListener('submit', function(e) {
            e.preventDefault();
            // 模拟登录成功
            loginModal.style.display = 'none';
            authButtons.style.display = 'none';
            userMenu.style.display = 'flex';
            alert('登录成功！');
        });

        // 注册功能
        registerForm.addEventListener('submit', function(e) {
            e.preventDefault();
            // 模拟注册成功
            registerModal.style.display = 'none';
            alert('注册成功，请登录！');
            loginModal.style.display = 'flex';
        });

        // 退出登录
        logoutBtn.addEventListener('click', function(e) {
            e.preventDefault();
            // 模拟退出登录
            userMenu.style.display = 'none';
            authButtons.style.display = 'block';
            // 返回首页
            sections.forEach(section => section.classList.remove('active'));
            document.getElementById('home').classList.add('active');
            alert('已退出登录！');
        });

        // 初始化 - 检查登录状态（这里默认未登录）
        function init() {
            // 可以在这里添加实际的登录状态检查逻辑
            authButtons.style.display = 'block';
            userMenu.style.display = 'none';
        }

        // 页面加载完成后初始化
        window.addEventListener('load', init);
    </script>
</body>
</html>
